<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Expires" content="Fri, Jan 01 1900 00:00:00 GMT">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="tinymce.min.js"></script>
<script type="text/javascript" src="tinymce_config.js"></script>
<script>             
//tinymce.init(tinyMceConfig);
$(function(){
    $('#add').click(function(){
        console.log($(this));
        tinyMCE.execCommand('mceAddEditor', false,'editor');
    });
    $('#remove').click(function(){
            console.log($(this));
        tinyMCE.execCommand('mceRemoveEditor', false,'editor');
    });
})
</script>
</head>
<body>
<textarea id="editor" class="mce_editor"></textarea>
<button id="add">Add</button>
<button id="remove">Remove</button>

</body>
</html>
